package edu.sctu.practice.class01.zhangwang.day2015_10_08.text01;

import java.util.Scanner;

/**
 * Created by Z_W on 2015/10/8.
 */
public class Client {

    public int v = 0;

    public void getInput() {
        System.out.println("请输入你猜测的数：");
        Scanner scanner = new Scanner(System.in);
        v = scanner.nextInt();


        Guess guess = new Guess();
        if (v < guess.v) {
            System.out.println("你输入的数小了！");
            getInput();
        } else if (v > guess.v) {
            System.out.println("你输入的数大了！");
            getInput();
        } else if (v == guess.v) {
            System.out.println("猜测成功！");
        }
    }
}
